package com.cg.springSecurity.controller;

import com.cg.springSecurity.base.ResultInfo;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author cg
 * @date 2023/3/29 9:56
 */
@RestController
@CrossOrigin
public class IndexController {
    @GetMapping("/admin")
    public ResultInfo admin() {
        return new ResultInfo("这是管理员。。。。");
    }

    @GetMapping("/user")
    public ResultInfo user() {
        return new ResultInfo("这是用户。。。。");
    }

    @GetMapping("/visitor")
    public ResultInfo visitor() {
        return new ResultInfo("这是游客。。。。");
    }
}
